<template>
  <div>
    <el-card>
      <!-- 返回 -->
      <div>
        <el-button type="primary" @click="goBack">
          <el-icon style="vertical-align: middle">
            <Back />
          </el-icon>
          <span style="vertical-align: middle"> 返回 </span>
        </el-button>
      </div>
      
      <!-- 问题详情 -->
      <div class="q-body">
        
      </div>
    </el-card>
  </div>
</template>

<script setup>
import {reactive, onMounted} from 'vue';
import {useRouter} from 'vue-router';
import {getQuestionInfo} from "../service/question";
import {ElMessage} from "element-plus";

const state = reactive({
  queryObj: {
    query: "",
    page_num: 1,
    page_size: 10
  }
})

onMounted(() => {
  getQuestionData()
})

const getQuestionData = async () => {
  const res = await getQuestionInfo(state.queryObj)
  state.question_list = res.data
  state.total = res.count
}

const route = useRouter()
const goBack = () => {
  route.back(-1)
}

</script>

<style scoped lang="less">

a {
  text-decoration: none;
  color: hsl(209deg 100% 38%);
}

</style>